﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<brjostagjof.Models.TimeLineEntry>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	Bæta við tímalínu
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <h2>Bæta við tímalínu barns</h2>

    <% using (Html.BeginForm("AddTimeline", "MySite", FormMethod.Post, new { enctype = "multipart/form-data" }))
       {%>
        <%: Html.ValidationSummary(true) %>

        <fieldset>
            <legend>Veldu mynd</legend>

            <input type="file" name="files" id="file1" size="25"  />      
          
            <div class="editor-field">
                <%: Html.HiddenFor(model => model.childID) %>
                <%: Html.ValidationMessageFor(model => model.childID) %>
            </div>
            
            <div class="editor-label">
                <%: Html.LabelFor(model => model.date) %>
            </div>
            <div class="editor-field">
                <%: Html.TextBoxFor(model => model.date) %>
                <%: Html.ValidationMessageFor(model => model.date) %>
            </div>
            
            <div class="editor-label">
               Texti
            </div>
            <div class="editor-field">
                <%: Html.TextAreaFor(model => model.description, new { rows = "10", cols = "40" })%>
                <%: Html.ValidationMessageFor(model => model.description) %>
            </div>

            <p>
                <input type="submit" value="Staðfesta" />
            </p>
        </fieldset>

    <% } %>

    <div>
        <%: Html.ActionLink("Til baka á mína síðu", "Index") %>
    </div>

</asp:Content>

